﻿<%@ Page Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true" CodeBehind="CategoryList.aspx.cs"
    Inherits="VCN.admin.CategoryList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table width="100%">
        <tr>
            <td colspan="3">
                <h2 style="text-align: center; color: #0099FF; font-size: x-large;">
                    QUẢN LÝ LOẠI SẢN PHẨM</h2>
            </td>
        </tr>
        <tr>
            <td style="width: 58px; color: #0099FF">
                <b>Từ khóa :</b></td>
            <td>
    <asp:TextBox ID="txt_TenChuyenMuc" runat="server" Width="175px"></asp:TextBox>
    &nbsp;&nbsp;
    <asp:Button ID="Button1" runat="server" OnClick="SearchTenCM_Click" Text="Tìm kiếm" />
                <asp:Button ID="Button2" runat="server" OnClick="ThemMoi_Click" 
                    Text="Thêm mới " />
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <br />
    <asp:Label ID="m_lbl_mess" runat="server" ForeColor="Red" Text="Message :" 
        Visible="False"></asp:Label>
    <br />
    <asp:GridView ID="dgv_Category" runat="server" CellPadding="4" ForeColor="#333333"
        Width="100%" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="ID"
        OnRowDeleting="gridCategories_Delete" OnRowEditing="gridCategories_Edit" BorderColor="#1C5E55"
        BorderStyle="Solid" OnPageIndexChanging="dgv_Category_PageIndexChanging">
        <RowStyle BackColor="#E3EAEB" />
        <Columns>
            <asp:TemplateField HeaderText="STT">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %></ItemTemplate>
                <ItemStyle Width="5%" />
            </asp:TemplateField>
            <asp:BoundField DataField="CATEGORY_NAME" HeaderText="Tên chuyên mục " />
            <asp:ImageField DataImageUrlField="ANH_MINH_HOA" DataImageUrlFormatString="../Images/Product/{0}"
                HeaderText="Image" ControlStyle-Width="70px" ControlStyle-Height="50px">
                <ControlStyle Height="50px" Width="70px"></ControlStyle>
            </asp:ImageField>
            <asp:TemplateField HeaderText="Sửa" >
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnEdit" runat="server" Text="Edit" CommandName="Edit"><img title="Sửa" src="img/edit.png" alt="Edit"/></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="5%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Xóa">
                <ItemTemplate>
                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="Delete" CommandName="Delete"
                        OnClientClick="return confirm('Bạn có chắc rằng bạn muốn xóa ?');"><img title="Xóa" src="img/deletered.png" alt="Delete" /></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle Width="5%" />
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#0099FF" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#7C6F57" />
        <AlternatingRowStyle BackColor="White" />
    </asp:GridView>
</asp:Content>
